Skip to content

Conversation

@LeChatP
Copy link
Owner

@LeChatP LeChatP commented Nov 16, 2025

This new version introduces v3.3.0 for adding UMask option in config, and landlock enforcement feature.

Copilot slop (actually somewhat relevant) :

This pull request introduces support for a configurable umask option in the execution environment, enhances configuration flexibility, and refines several existing option enums to remove legacy/inherited values. It also updates documentation to reflect these changes and adds comprehensive tests for the new umask type. Version numbers are incremented to reflect these significant changes.

New Feature: umask Option

  • Added a new umask field (SUMask) to the core option struct (Opt), allowing the execution environment's file creation mask to be set per role or configuration. Includes full serde (serialization/deserialization) support and extensive tests for correct parsing and formatting. (rar-common/src/database/options.rs, rar-common/Cargo.toml, .cargo/config.toml, book/src/chsr/README.md, book/src/chsr/file-config.md) [1] [2] [3] [4] [5] [6] [7]

Configuration and Defaults Improvements

  • Refactored the defaulting logic for the Opt struct to use constants and environment values directly, improving clarity and maintainability. Now, all default values (including the new umask) are set via a centralized method. (rar-common/src/database/options.rs) [1] [2]
  • Updated the SConfig and SRole structs to derive Default, ensuring easier instantiation and safer usage. (rar-common/src/database/structs.rs) [1] [2]

Enum and Policy Refinements

  • Removed legacy/inherited values from the SPrivileged, SBounding, and SAuthentication enums, leaving only currently supported policies. Updated parsing logic and documentation accordingly. (rar-common/src/database/options.rs, book/src/chsr/README.md) [1] [2] [3] [4] [5]
  • Updated documentation and sample configuration files to match the new allowed values for these policies and to include the new umask option. (book/src/chsr/README.md, book/src/chsr/file-config.md) [1] [2]

Version Bumps

  • Bumped the crate and dependency versions to 3.3.0 to reflect the addition of the umask feature and related breaking changes. (Cargo.toml, rar-common/Cargo.toml) [1] [2] [3]

Testing Enhancements

  • Added a comprehensive suite of unit tests for the new SUMask type, covering conversion, serialization, deserialization, and edge cases. (rar-common/src/database/options.rs)

@codecov
Copy link

codecov bot commented Jan 11, 2026

Codecov Report

❌ Patch coverage is 74.84663% with 82 lines in your changes missing coverage. Please review.
✅ Project coverage is 74.75%. Comparing base (b6a5f11) to head (4cdc190).
⚠️ Report is 25 commits behind head on main.

Files with missing lines Patch % Lines
src/sr/finder/api/landlock.rs 29.68% 45 Missing ⚠️
src/chsr/cli/editor.rs 86.74% 11 Missing ⚠️
src/sr/finder/mod.rs 42.85% 8 Missing ⚠️
rar-common/src/database/actor.rs 75.00% 4 Missing ⚠️
rar-common/src/util.rs 85.71% 3 Missing ⚠️
src/chsr/cli/process/json.rs 81.25% 3 Missing ⚠️
src/sr/finder/de.rs 85.00% 3 Missing ⚠️
rar-common/src/database/structs.rs 0.00% 2 Missing ⚠️
src/sr/finder/api/mod.rs 0.00% 2 Missing ⚠️
src/sr/finder/options.rs 96.15% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #87      +/-   ##
==========================================
- Coverage   76.14%   74.75%   -1.40%     
==========================================
  Files          33       36       +3     
  Lines        4595     5134     +539     
==========================================
+ Hits         3499     3838     +339     
- Misses       1096     1296     +200     
Flag Coverage Δ
admin-unittests 74.75% <74.84%> (-1.37%) ⬇️
unittests 74.71% <74.84%> (-1.37%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

LeChatP and others added 9 commits January 11, 2026 13:23
- Split `edit_config` into a public wrapper and a private `edit_config_internal` function to allow dependency injection.
- The internal function now accepts `BufRead` for input, `Write` for output, and a custom editor path string.
- Added a `tests` module to `src/chsr/cli/editor.rs`.
- Implemented `test_edit_config_success` to verify successful configuration updates using a mock editor script.
- Implemented `test_edit_config_abort` to verify the abort flow.
@LeChatP LeChatP changed the title v3.3.0 - v3.3.0 - SUmask and Landlock feature Jan 11, 2026
@LeChatP LeChatP merged commit 40d0e9c into main Jan 11, 2026
4 of 6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants